<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>

<head>
<base href="/">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>关键词报价</title>
<meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
<meta name="description"
	content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

<link rel="shortcut icon" href="favicon.ico">
<link href="static/templet/css/bootstrap.min.css?v=3.3.5"
	rel="stylesheet">
<link href="static/templet/css/font-awesome.min93e3.css"
	rel="stylesheet">

<!-- Data Tables -->
<link href="static/templet/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

<link href="static/templet/css/animate.min.css" rel="stylesheet">
<link href="static/templet/css/style.min.css?v=4.0.0" rel="stylesheet">
<style>
.clearfix:after{
	content:'';
	display:block;
	clear:both;
}
.goBack{
	float:left;
	width:50px;
	margin-top:20px;
}
.pag{
width:90%;
	float:right;
}
</style>
</head>

<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
	<form class="form-inline m-t" action="keyWord/proxy/offer"  method="post" name="keyWordForm" id="keyWordForm">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox">
   					<div class="ibox-content" align="center">
  						<div class="form-group">
  						    <input name="type" type="hidden" value="00">
		                    <input id ="keyWord" name="keyWord" type="text" value="${keyWord}"  autocomplete="off" class="form-control">
		                </div>
		                <button  onclick="search()" class="btn btn-primary">搜索</button>
					</div>
					<div class="ibox-content">
                        <table class="table table-striped table-bordered table-hover dataTables-example">
                            <thead>
                                 <tr>
									<th class="center">关键词</th>
									<th class="center">百度PC报价</th>
									<th class="center">百度Mobile报价</th>
									<th class="center">360PC报价</th>
									<th class="center">360Mobile报价</th>
									<th class="center">搜狗PC报价</th>
									<th class="center">搜狗Mobile报价</th>
									<th class="center">神马报价</th>
                                </tr>
                            </thead>
                              <tbody>
                                 <c:choose>
                                    <c:when test="${not empty keyWordOffer}">
                                       <%--  <c:if test="${QX.cha == 1 }"> --%>
                                            <c:forEach items="${keyWordOffer}" var="ko" varStatus="vs">
                                                <tr>
                                             	 	<td  class="center">${ko.keyWord}</td>
												  	<td  class="center">${ko.BaiduPc}</td>
													<td  class="center">${ko.BaiduMobile}</td>													
													<td  class="center">${ko.so}</td>
													<td  class="center">${ko.so}</td>
													<td  class="center">${ko.SogouPc}</td>
													<td  class="center">${ko.SogouMobile}</td>
													<td  class="center">${ko.shenma}</td>
                                                </tr>                    
                                            </c:forEach>
                                       <%--  </c:if>
                                        <c:if test="${QX.cha == 0 }">
                                            <tr>
                                                <td colspan="15" class="center">您无权查看</td>
                                            </tr>
                                        </c:if> --%>
                                    </c:when>
                                    <c:otherwise>
                                        <tr class="main_info">
                                            <td colspan="15" style="text-align:center;">没有相关数据</td>
                                        </tr>
                                    </c:otherwise>
                                </c:choose>
                            </tbody>
                            <%-- <tbody>
                             <tr>
                                <td  class="center">${keyWord}</td>
								<td  class="center">${BaiduPc}</td>
								<td  class="center">${BaiduMobile}</td>													
								<td  class="center">${so}</td>
								<td  class="center">${SogouPc}</td>
								<td  class="center">${SogouMobile}</td>
								<td  class="center">${shenma}</td>
							 </tr>
                          </tbody> --%>
                        </table>
                        </div>
                  	<div class="well">
						<span style="color: red;">查询关键词报价，最多可一次性查10个词，关键词用英文逗号隔开。</span>
		 			</div>
				 </div>
			 </div>
		 </div>
	  </form>
	</div>
	<script src="static/templet/js/jquery.min.js?v=2.1.4"></script>
	<script src="static/templet/js/plugins/layer/layer.min.js"></script>
	 <script src="static/templet/js/bootstrap.min.js?v=3.3.6"></script>
	<script type="text/javascript">
		/* function page(v){
			document.getElementById("pageNum").value= v;
			var form = document.getElementById("userForm");
			form.submit();
		} */
		function search(){
			 var form = document.getElementById("keyWordForm");
			 $("#keyWord").val($.trim($("#keyWord").val()));
			 form.submit(); 
		}
				
		function updateUser(id,userType) {
			var msg = userType == '02' ? '代理用户' : '普通用户';
			parent.layer.confirm('确定设置为'+msg+'吗？', {
			    btn: ['确定','取消'], //按钮
			    shade: false //不显示遮罩
			}, function(){
				   var url = "user/updateUser?id=" + id + "&userType=" + userType;
	                $.post(url, function (data,status){
	            		if(status == 'success'){
	            			var result = data.result;
	            			if(result.state == '1'){
	            				parent.layer.msg('操作成功', {icon: 1});
	            				location.reload();
	            			}else{
	            				parent.layer.msg('操作失败', {icon: 2});
	            			}
	            		}
	                }); 
			}, function(){});
		}
		
		function getDetail(id){
			layer.open({
        	    type: 2,
        	    title: '个人详情',
        	    shadeClose: true,
        	    shade: 0.8,
        	    area: ['60%', '50%'],
        	    btn: ['关闭'],
        	    content: 'user/detail?id='+ id,
        	    success: function(layero, index){
        	    	
        	    }
        	    
        	});
		}
		
		
		
	/* 	$(".fa-clone").on("click",function(){
			var orderId = $(this).attr("id");
			layer.open({
        	    type: 2,
        	    title: '订单详情',
        	    shadeClose: true,
        	    shade: 0.8,
        	    area: ['50%', '50%'],
        	    content: 'order/detail/'+orderId,
        	    success: function(layero, index){
        	    	var child = parent.layer.getChildFrame('body', index);
        	    	var $con = $(child).find('.fontawesome-icon-list')
        	    	$con.on('click','a',function(){
        	    		var $this = $(this);
        	    		$("#pic").find("i").attr("class",$this.find("i").attr("class"))
        	    		$("input[name=icon]").val($this.find("i").attr("class"));
        	    		parent.layer.close(index);
        	    	})
        	    }
        	    
        	});
		}) */
	</script>


</body>

</html>
